import {
	operationLog
} from '@/api/log.js'

export const tracking = async (module, operation_person, operation_objcet, operation_level, operation_status) => {
	if (module == '管理员') {
		// 操作内容
		let operation_content = `对管理员'${operation_objcet}'进行了删除操作`
		await operationLog(operation_person, operation_content, operation_level)
	}
	if (module == '超级管理员') {
		// 操作内容
		let operation_content = `对用户'${operation_objcet}'进行了'${operation_status}'操作`
		await operationLog(operation_person, operation_content, operation_level)
	}
	if (module == '审核小组' && operation_status == '审核') {
		// 操作内容
		let operation_content = `对'${operation_objcet}'的申请进行了'${operation_status}'操作`
		await operationLog(operation_person, operation_content, operation_level)
	}
	if (module == '辅导员' && operation_status == '审核') {
		// 操作内容
		let operation_content = `对'${operation_objcet}'的申请进行了'${operation_status}'操作`
		await operationLog(operation_person, operation_content, operation_level)
	}
}